<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    function fn() {}
    let fn_1 = function() {}
    //箭头函数：将function 去掉，在小括号后面加上=>
    (() => {
      console.log("箭头函数");
    })();
let fn_2 = () => {
    console.log("箭头函数1");
}
fn_2();
</script>
<script>
    let obj = {
        name: "张三",
        say: function() {
            console.log(this);
        },
        say_1() {
           console.log(this); 
        },
        say_2: () => {
            console.log(this);
        },

    }
    obj.say();
    obj.say_1();
    obj.say_2();
</script>
<script>
    let arr = [1,2,3,4,5];
    arr.map(function(){});
    arr.map((item,index) => {
        console.log(item);
    });
    arr.filter(() => {});
    arr.forEach(() => {});
    arr.reduce(() => {});
    setInterval(() => {
        console.log("this");
    },1000);
</script>
</html>